package com.xyh.log;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @Author:kyle
 * @Date:2020/12/11 - 23:33
 * @Project:spring_demo1
 * @Package:com.xyh.log
 * @Version:1.0
 */
public class LogEnhacer {

    public void log(){
        System.out.println("打印日志");
    }

    public void before(){
        System.out.println("-----前置通知");
    }

    public void aroundLog(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("环绕日志开始");
        joinPoint.proceed();
        System.out.println("环绕日志结束");
    }

    public void afterRunning(){
        System.out.println("-----后置通知");
    }

    public void after(){
        System.out.println("-----最终通知");
    }

    public void Exception(Throwable e){
        System.out.println("LogEnhancer.exp  异常通知:" + e.getMessage());

    }
}
